/*
 * @Descripttion: 
 * @version: 1.0
 * @Author: LiYansheng
 * @Date: 2022-05-10 16:18:45
 * @LastEditors: CoderXZ
 * @LastEditTime: 2022-05-27 21:46:15
 */
import request from '@/utils/request'

export function getAnalyze(){
    return request({
        url:'/admin/analyze',
        method:'get',
    })
}

export function search(form){
    return request({
        url:'/admin',
        method:'post',
        data:{
            "name":form.name,
            "pageIndex":form.pageIndex,
            "pageSize":form.pageSize
        }
    })
}

export function update(form){
    return request({
        url:'/admin/update',
        method:'post',
        data:{
            "id":form.id,
            "account":form.account,
            "name":form.name,
            "password":form.password,
            "avatar":form.avatar
        }
    })
}

export function add(form){
    return request({
        url:'/admin/add',
        method:'post',
        data:{
            "account":form.account,
            "name":form.name,
            "password":form.password,
        }
    })
}

export function del(id){
    return request({
        url:'/admin/delete/'+id,
        method:'post',
    })
}

